import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/login',
      name: 'login',
      // route level code-splitting
      component: () => import('../views/auth/LoginView.vue'),
    },
    {
      path: '/admins',
      name: 'admins',
      component: () => import('../views/admin/AdminListView.vue'),
    },
    {
      path: '/roles',
      name: 'roles',
      component: () => import('../views/role/RoleListView.vue'),
    },
    {
      path: '/permissions',
      name: 'permissions',
      component: () => import('../views/permission/PermissionListView.vue'),
    },
    {
      path: '/recharge-orders',
      name: 'recharge-orders',
      component: () => import('../views/recharge/RechargeOrderListView.vue'),
    },
    {
      path: '/balance-orders',
      name: 'balance-orders',
      component: () => import('../views/balance/BalancePaymentOrderListView.vue'),
    },
    {
      path: '/financial-records',
      name: 'financial-records',
      component: () => import('../views/finance/FinancialRecordListView.vue'),
    },
    {
      path: '/payment-configs',
      name: 'payment-configs',
      component: () => import('../views/finance/PaymentConfigListView.vue'),
    },
  ],
})

export default router
